package com.example.educationai.controller;

import jakarta.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/profile")
public class ProfileController {

    @GetMapping
    public String showProfile(HttpSession session) {
        if (session.getAttribute("user") == null) {
            return "redirect:/simple-login";
        }
        return "profile";
    }
} 